
#architectures={[],[30],[40],[60],[75],[100],[300],[500]};
#architectures={[30,40],[30,100],[75,60],[200,300],[30,40,60]};
architectures={[500]};

results=[];
times=[];
hists={}
nets={}

for(arch=1:size(architectures,2))
    for(i=1:10)
        t=cputime;
        [net hist] = train(architectures{arch},0.2,td, tl,0.045,45,[ed,el]);
        score = evaluate(net, ed, el);
    
        times(arch,i)=cputime-t;        
        results(arch,i)=score;
        nets{arch,i}=net;
        hists{arch,i}=hist;    

        filename=mode;
        for(c=1:size(architectures{arch},2))
            filename=[filename, ".", sprintf("%d",architectures{arch}(1,c))];
        end;
        filename=sprintf([filename, ".ver.", sprintf("%d",i),".score.",sprintf("%f",score),".nn"]);
        save(filename, 'net');
    end;
end;

save (sprintf([mode,"histories"]), 'hists');
save (sprintf([mode,"nets"]), 'nets');
save (sprintf([mode,"results"]), 'results');
save (sprintf([mode,"times"]), 'times');
